Skip to content

Conversation

@jhelison
Copy link
Contributor

@jhelison jhelison commented Sep 15, 2025

Description

This applies the external fee payments to the gas refund logic:

  • We check if the context has the key ContextPaidFeesKey
  • If it contains, we check if the value is a sdk.Coins
    • If all is ok, we override the amount and the denom used on the refund
    • The calculation is done using: amount * leftoverGas / gasUsed
    • This means the percentage of gas used multiplied by the amount

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation (updates documentation on the project)
  • chore (Updates on dependencies, gitignore, etc)
  • test (For updates on tests)

How Has This Been Tested?

All original tests are passing, since the code is safe when no data is found on the context.

@coderabbitai
Copy link

coderabbitai bot commented Sep 15, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/fee-abstraction

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jhelison jhelison merged commit 90dedcc into b-v0.4.1 Sep 15, 2025
10 of 17 checks passed
@jhelison jhelison deleted the feat/fee-abstraction branch September 15, 2025 20:46
@jhelison jhelison changed the title Fee abstraction Apply the external fee payment to EVM gas refunds logic (v0.4.1) Sep 19, 2025
@Thaleszh Thaleszh restored the feat/fee-abstraction branch October 29, 2025 15:59
@Thaleszh Thaleszh deleted the feat/fee-abstraction branch October 30, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants